# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libpeas
pkgver=1.22.0
pkgrel=3
pkgdesc="A GObject plugins library"
arch=(x86_64)
url="https://wiki.gnome.org/Projects/Libpeas"
license=(GPL2)
depends=(gtk3 gobject-introspection-runtime)
makedepends=(gtk-doc intltool python-gobject python2-gobject glade gobject-introspection git
             gnome-common)
_commit=2f8b28dd8e1edc1bc3b05ef5379e4aa7d2876efb  # tags/libpeas-1.22.0^0
source=("git+https://gitlab.gnome.org/GNOME/libpeas.git#commit=$_commit")
sha256sums=('SKIP')


pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^libpeas-//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-gtk-doc --disable-static

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}

# vim:set ts=2 sw=2 et:
